home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
videoutils
/
a-g
/
ami2d
/
macros
/
htemp.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1978-11-24
|
2KB
|
93 lines
/* macro to plot deformed model to printer or postscript file */
options results
parse arg dev
address ami2d
scale = 1.0
'get scale'
if result ~= 0.0 then scale = result
'info(window)'
parse var result xmin xmax ymin ymax
m = open('outfile','ram:plot.gnu','w')
select
when dev='dj' then do
m = writeln('outfile','set size 1,.86')
m = writeln('outfile','set term hpdj 300')
m = writeln('outfile','set output "par:"')
end
when dev='ps' then do
m = writeln('outfile','set size 1.2,1.2')
m = writeln('outfile','set term postscript eps color "Bodoni-Normal" 14')
m = writeln('outfile','set output "ram:temp.ps"')
end
otherwise nop
end
m = writeln('outfile','set xlabel')
m = writeln('outfile','set ylabel')
m = writeln('outfile','set key')
m = writeln('outfile','set noxtics')
m = writeln('outfile','set noytics')
m = writeln('outfile','set noxzeroaxis')
m = writeln('outfile','set noyzeroaxis')
m = writeln('outfile','plot ['xmin':'xmax'] ['ymin':'ymax'] ''pipe:elems'' title "model" with lines 7,\')
m = writeln('outfile','''pipe:temps'' title "temp" with points 3 3')
m = close('outfile')
address command 'run gnuplot ram:plot.gnu'
'info'
parse var result nnodes nelems nsolns
m = open('outfile','pipe:elems','w')
m = writeln('outfile','# model - 'modelfile' nelems = 'nelems)
do i=0 to nelems-1
'info(elem,'i')'
parse var result nd id mid nn ni n.1 n.2 n.3 n.4 n.5 n.6 n.7 n.8 n.9
m = writeln('outfile','# element 'id)
if nn > 4 then do
nc = nn % 2
nm = 2
end
else do
nc = nn
nm = 1
end
do j=1 to nc
do k=1 to nm
l = j + nc*(k - 1)
'info(node,'n.l')'
parse var result nd id x1 y1
m = writech('outfile',left(x1,18))
m = writeln('outfile',left(y1,18))
end
end
'info(node,'n.1')'
parse var result nd id x1 y1
m = writech('outfile',left(x1,18))
m = writeln('outfile',left(y1,18))
m = writeln('outfile','')
end
m = close('outfile')
m = open('outfile','pipe:temps','w')
m = writeln('outfile','# model - 'modelfile' nnodes = 'nnodes)
do i=0 to nnodes-1
'info(pbc,'i')'
parse var result nd id type kind val
if kind = 1 then do
'info(node,'i')'
parse var result nd id x1 y1
m = writech('outfile',left(x1,18))
m = writeln('outfile',left(y1,18))
end
end
m = close('outfile')
exit